package com.cyw.note.manage.domain.bo;

import com.cyw.common.core.domain.BaseEntity;
import com.cyw.common.core.validate.AddGroup;
import com.cyw.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 文章类型业务对象 t_type
 *
 * @author 二叔
 * @date 2022-08-07
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("文章类型业务对象")
public class TypeBo extends BaseEntity {

    /**
     * 分类id
     */
    @ApiModelProperty(value = "分类id", required = true)
    @NotNull(message = "分类id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称", required = true)
    @NotBlank(message = "分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;


}
